package com.hz.house.utils;

public class ConverUtils {
    public static int parseInt(String source, int def){
        try {
            return Integer.parseInt(source);
        }catch (Exception e){}
        return def;
    }

    public static int parseInt(String source){
        return  parseInt(source, 0);
    }

    public static long parseLong(String source){
        return parseLong(source, 0);
    }

    public static long parseLong(String source, long def){
        try {
            return Long.parseLong(source);
        }catch (Exception e){}
        return def;
    }
}
